package is.common.interfaces;

import is.common.exception.DroppingNonEmptyDepartmentException;
import is.common.exception.RowNotFoundException;
import is.common.exception.UniqueCheckFailedException;
import is.common.exception.RowsAreaIncorrectException;
import org.w3c.dom.Node;

/**
 * Base methods for section adapters.
 *
 * @author aspr0
 *         Date: 15.04.12
 *         Time: 13:28
 */
public interface SectionAdapter       //todo implement these methods in model, not SA. Moving SA role to Content Handlers
{
    /**
     * @param rowNumStart
     * @param howMany
     * @return
     */
    public String[][] getRows(int rowNumStart, int howMany) throws RowsAreaIncorrectException, RowNotFoundException;

    public String[] getHeader();

    /**
     * @param row
     */
    public void addRow(String[] row) throws RowNotFoundException, UniqueCheckFailedException;

    /**
     * @param row
     */
    public void editRow(String[] row) throws UniqueCheckFailedException, RowNotFoundException;

    /**
     * @param rowNums
     */
    public String dropRows(String[] rowNums) throws DroppingNonEmptyDepartmentException;

    public String[][] findRows(String[] masks) throws RowNotFoundException;

    public Node createSection();
}
